package Demo_0408;

/**
 * @author:zhengyilong
 * @email:1797344574@qq.com
 * @phone:13479394730
 * @desc:
 * @DateTime:2022/4/13 11:06
 **/
public class Test {
    public static void main(String[] args) {
        Integer [] arr = {1,2,3,4,5,6,7,8,9,10};
        ArrayListClass alc = new ArrayListClass<>();

        alc.CreateArrayList(arr);

        System.out.println(alc.isEmpty());

        System.out.println(alc.size());

        alc.add(5);
        System.out.println(alc);

        alc.add(5,3);
        System.out.println(alc);

        System.out.println(alc.contains(88));

        System.out.println(alc.get(8));

        Object set = alc.set(5, 50);
        System.out.println(set);
        System.out.println(alc);

        System.out.println(alc.indexOf(5));
        System.out.println(alc.lastIndexOf(5));

//        alc.clear();
//        System.out.println(alc.size());

        Object remove = alc.remove(5);
        System.out.println(remove);
        System.out.println(alc);

        boolean remove1 = alc.remove(new Integer(5));
        System.out.println(remove1);
        System.out.println(alc);
    }
}

